import { createApp } from 'vue'
import '@/style/normalize.css';
import SvgIcon from '@/components/SvgIcon/SvgIcon.vue';
import ColorPicker from 'colorpicker-v3'; // 注册组件
import 'colorpicker-v3/style.css'; // 引入样式文件
import '@/assets/iconfont/iconfont.js';
import '@/assets/font/font.css';
import '@/views/LegoDesigner/assets/font/legoFont.css';
import CScrollbar from 'c-scrollbar';
import {createPinia} from "pinia";
import { registerStore } from '@/store';
import 'viewerjs/dist/viewer.css';
import VueViewer from 'v-viewer';
import 'default-passive-events';
import VueDOMPurifyHTML from 'vue-dompurify-html';
import UndrawUi from './components/packages/index';
import { userAgent } from '@/utils/userAgent';
import contextmenu from 'v-contextmenu';
import 'v-contextmenu/dist/themes/default.css';
import configDirectives from '@/directives/config';
import '@/style/article/github-markdown-light.css'; // 文章样式
import { createHead } from '@vueuse/head';
import '@/assets/css/variable.css'

import { AVPlugin } from "vue-audio-visual";
import 'element-plus/dist/index.css'
import 'element-plus/es/components/message-box/style/index';
import 'element-plus/theme-chalk/src/message.scss';

userAgent();

import App from './App.vue'
const app = createApp(App)
const pinia = createPinia()
app.use(pinia)
registerStore();
import router from './router'

app.use(router)
    .use(VueDOMPurifyHTML, {
        default: {
            ADD_TAGS: ['iframe']
        }
    })
    .use(ColorPicker)
    .use(AVPlugin)
    .use(CScrollbar)
    .use(configDirectives)
    .use(VueViewer)
    .use(contextmenu)
    .component('SvgIcon', SvgIcon)
    .use(UndrawUi)
    .use(createHead())
    .mount('#app')
